home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SV_VF.ZIP / Virtua Fighter 1.txt < prev   
Encoding:
Text File  |  1998-06-01  |  14.4 KB  |  315 lines

  1.  
  2. Free Information Xchange '97 presents:
  3.  
  4. Virtua Fighter - CD Crack by Static Vengeance
  5.  
  6. Requirements:
  7. Hex Editor and Full Install
  8.  
  9.  
  10.     Ok, once again I set out to remove the CD check from a SEGA Entertainment game using W32Dasm
  11. from URSoft.  Having already cracked two games by Sega (Daytona USA and Virtua Fighter 2) I thought
  12. this game would be striaght forward and fairly easy to do.  However, just when you count on something
  13. being easy, it's not!.. So if you following along I'll show what I found and what I did to remove the
  14. CD check from this game.  Also bear in mind that the program version I'm using is the updated DirectX
  15. v3b version of Virtua Fighter and not the version from the CD, although I have included a simular patch
  16. for that version also.  Let's get going:
  17.     Start up W32Dasm and 'Open file to disassemble' using vfpc.exe from where ever you installed it
  18. to.  Once W32Dasm has finished it's process and is ready, go up to the title bar select 'Refs' and choose
  19. 'String data references'.  From here grab the slider bar and scroll down looking at the strings.
  20. Eventually you find "Cannot find Virtua Fighter(TM) ".  So double click on this and it puts you in the
  21. middle of the CD check routine.  So let's take a look at the code:
  22.  
  23. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  24. |:00505544(C), :00505558(C)
  25. |
  26. :00505565 6A00                    push 00000000
  27.  
  28. * Possible StringData Ref from Data Obj ->"Virtua Fighter PC"
  29.                                   |
  30. :00505567 68D0CFB000              push 00B0CFD0
  31.  
  32. * Reference To: USER32.FindWindowA, Ord:00C8h
  33.                                   |
  34. :0050556C FF1598F5BE00            Call dword ptr [00BEF598]
  35. :00505572 8945DC                  mov dword ptr [ebp-24], eax
  36. :00505575 837DDC00                cmp dword ptr [ebp-24], 00000000
  37. :00505579 0F8411000000            je 00505590
  38. :0050557F 8B45DC                  mov eax, dword ptr [ebp-24]
  39. :00505582 50                      push eax
  40.  
  41. * Reference To: USER32.BringWindowToTop, Ord:000Ah
  42.                                   |
  43. :00505583 FF15A0F5BE00            Call dword ptr [00BEF5A0]
  44. :00505589 33C0                    xor eax, eax
  45. :0050558B E9D2000000              jmp 00505662
  46.  
  47. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  48. |:00505579(C)
  49. |
  50. :00505590 E87FCEEFFF              call 00402414         <-- Check for file on CD
  51. :00505595 85C0                    test eax, eax         <-- Did it pass?
  52. :00505597 0F844A000000            je 005055E7           <-- Take this jump for a pass
  53.  
  54. * Reference To: KERNEL32.GetOEMCP, Ord:00F6h            <-- Otherwise tell EVIL user to insert CD
  55.                                   |
  56. :0050559D FF15BCF4BE00            Call dword ptr [00BEF4BC]
  57. :005055A3 8945B0                  mov dword ptr [ebp-50], eax
  58. :005055A6 817DB0A4030000          cmp dword ptr [ebp-50], 000003A4
  59. :005055AD 0F8519000000            jne 005055CC
  60. :005055B3 6A30                    push 00000030
  61.  
  62. * Possible StringData Ref from Data Obj ->"Virtua Fighter PC"
  63.                                   |
  64. :005055B5 68D0CFB000              push 00B0CFD0
  65.  
  66. * Possible StringData Ref from Data Obj ->"Virtua Fighter(TM) PC "
  67.                                   |
  68. :005055BA 6820D0B000              push 00B0D020
  69. :005055BF 6A00                    push 00000000
  70.  
  71. * Reference To: USER32.MessageBoxA, Ord:0197h
  72.                                   |
  73. :005055C1 FF1538F5BE00            Call dword ptr [00BEF538]
  74. :005055C7 E914000000              jmp 005055E0
  75.  
  76. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  77. |:005055AD(C)
  78. |
  79. :005055CC 6A30                    push 00000030
  80.  
  81. * Possible StringData Ref from Data Obj ->"Virtua Fighter PC"
  82.                                   |
  83. :005055CE 68D0CFB000              push 00B0CFD0
  84.  
  85. * Possible StringData Ref from Data Obj ->"Cannot find Virtua Fighter(TM) "  <-- Seems like something we're
  86.                                         ->"PC CD."                           <-- looking for, right?
  87.                                   |
  88. :005055D3 68CCD0B000              push 00B0D0CC
  89. :005055D8 6A00                    push 00000000
  90.  
  91. * Reference To: USER32.MessageBoxA, Ord:0197h
  92.                                   |
  93. :005055DA FF1538F5BE00            Call dword ptr [00BEF538]
  94.  
  95. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  96. |:005055C7(U)
  97. |
  98. :005055E0 33C0                    xor eax, eax
  99. :005055E2 E97B000000              jmp 00505662
  100.  
  101. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  102. |:00505597(C)
  103. |
  104. :005055E7 8B4510                  mov eax, dword ptr [ebp+10]
  105. :005055EA 50                      push eax
  106. :005055EB 8B4514                  mov eax, dword ptr [ebp+14]
  107. :005055EE 50                      push eax
  108. :005055EF 8B450C                  mov eax, dword ptr [ebp+0C]
  109. :005055F2 50                      push eax
  110. :005055F3 8B4508                  mov eax, dword ptr [ebp+08]
  111. :005055F6 50                      push eax
  112. :005055F7 E815CCEFFF              call 00402211
  113. :005055FC 83C410                  add esp, 00000010
  114. :005055FF 85C0                    test eax, eax
  115. :00505601 0F8507000000            jne 0050560E
  116. :00505607 33C0                    xor eax, eax
  117. :00505609 E954000000              jmp 00505662
  118.  
  119. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  120. |:00505601(C)
  121. |
  122. :0050560E C745E000000000          mov [ebp-20], 00000000
  123. :00505615 8D45E0                  lea eax, dword ptr [ebp-20]
  124. :00505618 50                      push eax
  125. :00505619 68301C4000              push 00401C30
  126.  
  127. * Reference To: USER32.EnumWindows, Ord:00C3h
  128.                                   |
  129. :0050561E FF15A4F5BE00            Call dword ptr [00BEF5A4]
  130. :00505624 837DE001                cmp dword ptr [ebp-20], 00000001
  131. :00505628 0F8E07000000            jle 00505635
  132. :0050562E 33C0                    xor eax, eax
  133. :00505630 E92D000000              jmp 00505662
  134.  
  135. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  136. |:00505628(C)
  137. |
  138. :00505635 A164395400              mov eax, dword ptr [00543964]
  139. :0050563A 50                      push eax
  140. :0050563B 8B4514                  mov eax, dword ptr [ebp+14]
  141. :0050563E 50                      push eax
  142. :0050563F 8B4510                  mov eax, dword ptr [ebp+10]
  143. :00505642 50                      push eax
  144. :00505643 8B450C                  mov eax, dword ptr [ebp+0C]
  145. :00505646 50                      push eax
  146. :00505647 8B4508                  mov eax, dword ptr [ebp+08]
  147. :0050564A 50                      push eax
  148. :0050564B E872CFEFFF              call 004025C2
  149. :00505650 83C414                  add esp, 00000014
  150. :00505653 8945EC                  mov dword ptr [ebp-14], eax
  151. :00505656 E888C7EFFF              call 00401DE3
  152. :0050565B 33C0                    xor eax, eax
  153. :0050565D E900000000              jmp 00505662
  154.  
  155. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  156. |:0050553B(U), :00505560(U), :0050558B(U), :005055E2(U), :00505609(U)
  157. |:00505630(U), :0050565D(U)
  158. |
  159. :00505662 5F                      pop edi
  160. :00505663 5E                      pop esi
  161. :00505664 5B                      pop ebx
  162. :00505665 C9                      leave
  163. :00505666 C21000                  ret 0010
  164.  
  165.     The first conditional branch before it prints "cannot find.." comes from 5055AD by way of
  166. listed reference at 5055CC.. so time to check out 5055AD and surounding code a little closer.  We see
  167. the conditional branch/jump (jne) at 5055AD and a call to the KERNEL32.GetOEMCP... so back up some
  168. more... and you see at 505590 is a call, a test and a condition jump... this looks interesting...
  169. following the code you check out 402414 and will find it jumps to 4ACDF9.  Alright, time to follow
  170. that section of code and try to see what it does:
  171.  
  172. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  173. |:00402414(U)
  174. |
  175. :004ACDF9 55                      push ebp
  176. :004ACDFA 8BEC                    mov ebp, esp
  177. :004ACDFC 81EC54010000            sub esp, 00000154
  178. :004ACE02 53                      push ebx
  179. :004ACE03 56                      push esi
  180. :004ACE04 57                      push edi
  181.  
  182. * Possible StringData Ref from Data Obj ->"rb"
  183.                                   |
  184. :004ACE05 68C011B400              push 00B411C0
  185.  
  186. * Possible StringData Ref from Data Obj ->"texture2.bin"              <-- Check CD for this file
  187.                                   |
  188. :004ACE0A 68C411B400              push 00B411C4
  189. :004ACE0F E89250F5FF              call 00401EA6
  190. :004ACE14 83C404                  add esp, 00000004
  191. :004ACE17 50                      push eax
  192. :004ACE18 E823F90700              call 0052C740
  193. :004ACE1D 83C408                  add esp, 00000008
  194. :004ACE20 8945FC                  mov dword ptr [ebp-04], eax
  195. :004ACE23 837DFC00                cmp dword ptr [ebp-04], 00000000
  196. :004ACE27 0F850A000000            jne 004ACE37
  197. :004ACE2D B801000000              mov eax, 00000001
  198. :004ACE32 E9B8000000              jmp 004ACEEF
  199.  
  200. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  201. |:004ACE27(C)
  202. |
  203. :004ACE37 8B45FC                  mov eax, dword ptr [ebp-04]
  204. :004ACE3A 50                      push eax
  205. :004ACE3B 6800010000              push 00000100
  206. :004ACE40 6A01                    push 00000001
  207. :004ACE42 8D85ACFEFFFF            lea eax, dword ptr [ebp+FFFFFEAC]
  208. :004ACE48 50                      push eax
  209. :004ACE49 E812F90700              call 0052C760
  210. :004ACE4E 83C410                  add esp, 00000010
  211. :004ACE51 8B45FC                  mov eax, dword ptr [ebp-04]
  212. :004ACE54 50                      push eax
  213. :004ACE55 E826F80700              call 0052C680
  214. :004ACE5A 83C404                  add esp, 00000004
  215.  
  216. * Possible StringData Ref from Data Obj ->"\vfpc\vfrright.txt"      <-- Path of file on CD to check for
  217.                                   |
  218. :004ACE5D A1BC11B400              mov eax, dword ptr [00B411BC]
  219. :004ACE62 50                      push eax
  220. :004ACE63 0FBE8548FFFFFF          movsx eax, byte ptr [ebp+FFFFFF48]
  221. :004ACE6A 83C040                  add eax, 00000040
  222. :004ACE6D 50                      push eax
  223.  
  224. * Possible StringData Ref from Data Obj ->"%c:%s"
  225.                                   |
  226. :004ACE6E 68D411B400              push 00B411D4
  227. :004ACE73 8D45AC                  lea eax, dword ptr [ebp-54]
  228. :004ACE76 50                      push eax
  229. :004ACE77 E824FD0700              call 0052CBA0
  230. :004ACE7C 83C410                  add esp, 00000010
  231. :004ACE7F 6A00                    push 00000000
  232. :004ACE81 8D45AC                  lea eax, dword ptr [ebp-54]
  233. :004ACE84 50                      push eax
  234. :004ACE85 E856ED0800              call 0053BBE0
  235. :004ACE8A 83C408                  add esp, 00000008
  236. :004ACE8D 85C0                    test eax, eax                      <-- Here's a test
  237. :004ACE8F 0F850C000000            jne 004ACEA1                       <-- Not equal, look again
  238. :004ACE95 33C0                    xor eax, eax                       <-- Good, make eax = zero
  239. :004ACE97 E953000000              jmp 004ACEEF                       <-- jmp to end of routine
  240. :004ACE9C E94E000000              jmp 004ACEEF
  241.  
  242. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  243. |:004ACE8F(C)
  244. |
  245.  
  246. * Possible StringData Ref from Data Obj ->"\vfpc\vfrright.txt"       <-- File on CD again...
  247.                                   |
  248. :004ACEA1 A1BC11B400              mov eax, dword ptr [00B411BC]
  249. :004ACEA6 50                      push eax
  250. :004ACEA7 0FBE8547FFFFFF          movsx eax, byte ptr [ebp+FFFFFF47]
  251. :004ACEAE 83C040                  add eax, 00000040
  252. :004ACEB1 50                      push eax
  253.  
  254. * Possible StringData Ref from Data Obj ->"%c:%s"
  255.                                   |
  256. :004ACEB2 68DC11B400              push 00B411DC
  257. :004ACEB7 8D45AC                  lea eax, dword ptr [ebp-54]
  258. :004ACEBA 50                      push eax
  259. :004ACEBB E8E0FC0700              call 0052CBA0
  260. :004ACEC0 83C410                  add esp, 00000010
  261. :004ACEC3 6A00                    push 00000000
  262. :004ACEC5 8D45AC                  lea eax, dword ptr [ebp-54]
  263. :004ACEC8 50                      push eax
  264. :004ACEC9 E812ED0800              call 0053BBE0
  265. :004ACECE 83C408                  add esp, 00000008
  266. :004ACED1 85C0                    test eax, eax            <-- Test again
  267. :004ACED3 0F850C000000            jne 004ACEE5                  <-- not equal, then fail
  268. :004ACED9 33C0                    xor eax, eax            <-- good, set eax to zero
  269. :004ACEDB E90F000000              jmp 004ACEEF                  <-- jmp to end
  270. :004ACEE0 E90A000000              jmp 004ACEEF
  271.  
  272. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  273. |:004ACED3(C)
  274. |
  275. :004ACEE5 B801000000              mov eax, 00000001             <-- Force fail value (anything but zero)
  276. :004ACEEA E900000000              jmp 004ACEEF
  277.  
  278. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  279. |:004ACE32(U), :004ACE97(U), :004ACE9C(U), :004ACEDB(U), :004ACEE0(U)
  280. |:004ACEEA(U)
  281. |
  282. :004ACEEF 5F                      pop edi
  283. :004ACEF0 5E                      pop esi
  284. :004ACEF1 5B                      pop ebx
  285. :004ACEF2 C9                      leave
  286. :004ACEF3 C3                      ret
  287.  
  288.     I guess that seems fairly straight forward... now that I had looked into it a bit.  This little
  289. section of code is THE determining factor in the CD check:
  290.  
  291. :00505590 E87FCEEFFF              call 00402414  <-- Check for \vfpc\vfrright.txt on CD
  292. :00505595 85C0                    test eax, eax  <-- Test the results of the CD check
  293. :00505597 0F844A000000            je 005055E7    <-- eax=zero is good check
  294.  
  295.     Ok, now we have the code responsible for the CD check, and we see the test and the single
  296. conditional jump for a pass or fail of that check.  The edit comes in the form of replacing the call
  297. with instructions to xor eax,eax (eXcluse OR eax to itself, which zeros out eax and would be the same
  298. as a good CD check) which makes the je (jump on equal (zero)) always true.  Then fill in the remainder
  299. of bytes with NOP's (No OPeration)  The actual edits for the crack depends on the version you have:
  300.  
  301. CD file version EDIT vfpc.exe (offset 1,058,725)
  302. ================================================
  303. Search for: E8 9C F0 EF FF
  304. Change to : 33 C0 90 90 90
  305.  
  306. dx3b update version EDIT vfpc.exe (offset 1,067,408)
  307. ====================================================
  308. Search for: E8 7F CE EF FF
  309. Change to : 33 C0 90 90 90
  310.  
  311.     Now you can play Virtua Fighter without putting the CD in the CD-ROM drive first, becuase
  312. you have just FiX'ed this game.
  313.  
  314. Static Vengeance
  315.